﻿//Author: hkmtrhah (http://hkmtrhah.nets.hk)
//Date: 22-8-2011
//Time: 11:21
//Created by SharpDevelop.
using System;
using System.Windows.Forms;

namespace SimutransOnlineHosterAppForON9
{
	/// <summary>
	/// Class with program entry point.
	/// </summary>
	internal sealed class Program
	{
		/// <summary>
		/// Program entry point.
		/// </summary>
		[STAThread]
		private static void Main(string[] args)
		{
			string OrigFilePath = System.IO.Path.Combine(Application.StartupPath, "simutrans.exe");
			
			if(System.IO.File.Exists(OrigFilePath) == false)
			{
				MessageBox.Show("Please put this executable on the same directory as \"simutrans.exe\". \r\nThis application exits now.", "Simutrans Online Hoster App", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
				Application.Exit();
			}
			else
			{
				Application.EnableVisualStyles();
				Application.SetCompatibleTextRenderingDefault(false);
				Application.Run(new MainForm());
			}
		}
		
	}
}
